package com.warthur.spring.shiro.dao;

import com.warthur.spring.shiro.pojo.RolePermission;
import com.warthur.spring.shiro.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.Set;

/**
 * @author warthur
 * @date 2018/09/08
 */
@Mapper
public interface UserDAO {

    /**
     * 根据用户名查用户信息
     * @param userName user name
     * @return user object
     */
    User findUserByName(String userName);

    /**
     * 根据用户名查询用户所有权限
     * @param userName user name
     * @return user object
     */
    Set<RolePermission> findUserPermissionsByName(String userName);
}
